<template>
  <div class="weekend">
    <div class="title">周末去哪</div>
    <ul class="items">
      <li v-for="item of list" :key="item.id" class="item">
        <div class="item-img">
          <img :src="item.imgUrl" alt="">
        </div>
        <div class="item-title">{{item.title}}</div>
        <div class="item-intro">{{item.desc}}</div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'HomeWeekend',
  props: {
    list: Array
  }
}
</script>
<style lang="stylus" scoped>
@import '~css/variable.styl'
  .weekend
    .title
      font-size .4rem
      height .8rem
      line-height .8rem
      padding 0 .2rem
      background #f5f5f5
    .items
      font-size .3rem
      .item
        background #fff
        margin-bottom .15rem
        &-img
          width 100%
          height 0
          overflow hidden
          padding-bottom 37.03125%
          background #ccc
          img
            width 100%
            // height 100%
            object-fit cover
        &-title
          padding 0 .2rem
          font-size .4rem
          height .7rem
          line-height .7rem
        &-intro
          padding 0 .2rem
          font-size .3rem
          height .4rem
          line-height .4rem
          color $secondColor
</style>
